#example 3
class Descriptor2(object):

    def __init__(self):
        self.www = ''
        self.ww = ''
        self.w = ''

    def __get__(self, instance, owner):
        print ("Getting: %s" % self._name)
        return self._name

    def __setattr__(self, name, value):
        print ('__setattr__', name, value)
        return object.__setattr__(self, name, value)


class Person2(object):
    name = Descriptor2()

user      = Person2()
user.xxx = 'john smith'
print (user.xxx)
